@mermaid-js/mermaid-cli 9.1.6 → 9.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,6 +21,26 @@ mmdc -i input.mmd -o output.svg
21
21
  mmdc -i input.mmd -o output.png -t dark -b transparent
22
22
  ```
23
23
 
24
+ ### Animating an SVG file with custom CSS
25
+
26
+ The `--cssFile` option can be used to inline some custom CSS.
27
+
28
+ Please see [./test-positive/flowchart1.css](test-positive/flowchart1.css) for an example of a CSS file that has animations.
29
+
30
+ **Warning**: If you want to override `mermaid`'s [`themeCSS`](https://mermaid-js.github.io/mermaid/#/Setup?id=theme), we recommend instead adding `{"themeCSS": "..."})` to your mermaid `--configFile`. You may also need to use [`!important`](https://developer.mozilla.org/en-US/docs/Web/CSS/important) to override mermiad's `themeCSS`.
31
+
32
+ **Warning**: Inline CSS files may be blocked by your browser, depending on the [HTTP Content-Security-Policy header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) of the website that hosts your SVG.
33
+
34
+ ```sh
35
+ mmdc --input test-positive/flowchart1.mmd --cssFile test-positive/flowchart1.css -o docs/animated-flowchart.svg
36
+ ```
37
+
38
+ <details>
39
+ <summary>Example output: docs/animated-flowchart.svg</summary>
40
+
41
+ ![docs/animated-flowchart.svg](docs/animated-flowchart.svg)
42
+ </details>
43
+
24
44
  ### Transform a markdown file with mermaid diagrams
25
45
 
26
46
  ```sh
@@ -43,6 +63,14 @@ graph
43
63
  sequenceDiagram
44
64
  [....]
45
65
  ```
66
+
67
+ ### Mermaid with custom title/desc
68
+ ```mermaid
69
+ graph
70
+ accTitle: My title here
71
+ accDescr: My description here
72
+ A-->B
73
+ ```
46
74
  ~~~
47
75
 
48
76
  Becomes:
@@ -53,6 +81,9 @@ Becomes:
53
81
 
54
82
  ### Some more markdown
55
83
  ![diagram](./readme-2.svg)
84
+
85
+ ### Mermaid with custom title/desc
86
+ ![My description here](./readme-3.svg "My title here")
56
87
  ```
57
88
 
58
89
  ### Piping from stdin
@@ -138,7 +169,9 @@ permission issues.
138
169
  `yarn global add @mermaid-js/mermaid-cli` or `npm install -g @mermaid-js/mermaid-cli`
139
170
 
140
171
  ## Install with [brew](https://brew.sh)
141
-
172
+ This method of installation is no longer supported.
173
+ For more details, see the [discussion](https://github.com/mermaid-js/mermaid-cli/issues/288).
174
+ An old version of mermaid-cli can be installed with brew.
142
175
  ```
143
176
  brew install mermaid-cli
144
177
  ```
@@ -154,6 +187,7 @@ it installs (`mmdc`). `npx -p @mermaid-js/mermaid-cli mmdc -h`
154
187
 
155
188
  1. [Linux sandbox issue](docs/linux-sandbox-issue.md)
156
189
  2. [Docker permission denied issue](docs/docker-permission-denied.md)
190
+ 3. [How to setup up mermaid to use already installed chromium?](docs/already-installed-chromium.md)
157
191
 
158
192
  ## For contributors
159
193